﻿using Ant.Interface.GlobalInfo;

namespace Ant.Interface.Mef.Model
{
    /// <summary>
    /// 插件集合配置项。
    /// </summary>
    public class MefsConfigItem
    {
        #region "Field"

        private string _catalogsPath;

        #endregion "Field"

        #region "Property"

        /// <summary>
        /// 目录配置文件路径。
        /// </summary>
        public string CatalogsPath
        {
            get { return _catalogsPath; }
            set
            {
                if (string.IsNullOrWhiteSpace(value))
                    _catalogsPath = null;
                _catalogsPath = value.Replace("{ApplicationPhysicalPath}", EnvironmentInfo.ApplicationPhysicalPath).Replace("{ApplicationPhysicalConfig}", EnvironmentInfo.ConfigPhysicalPath);
            }
        }

        /// <summary>
        /// 说明。
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// 是否启用。
        /// </summary>
        public bool Enabled { get; set; }

        #endregion "Property"
    }
}